package com.daily.DailyStudy.redis.Jedis使用;

import redis.clients.jedis.Jedis;

public class JedisSimpleDemo {

    public static void testJedisSingle(){
        //1 设置ip地址和端口
        Jedis jedis = new Jedis("127.0.0.1",6379);
        //2 设置数据
        jedis.set("demo01","jedis测试");
        //3 获得数据
        String demo01 = jedis.get("demo01");
        System.out.println(demo01);
        //4 释放资源
        jedis.close();
    }

    public static void main(String[] args) {
        testJedisSingle();
    }
}
